package com.aviccxzx.smarthome.UserModule;

import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.aviccxzx.smarthome.R;
import com.aviccxzx.smarthome.base.GosUserModuleBaseActivity;


/**
 * Created by joey on 2016/10/25.
 */
public class DeviceInfoActivity extends GosUserModuleBaseActivity implements View.OnClickListener {
String [] classStandard = new String[]{"SH-MC1-001","SH-SG1-001","SH-RQ1-001","SH-YW1-001","SH-SJ1-001"};
String [] classNoStandard = new String[]{"SH-MC1-002","SH-SG1-002","SH-RQ1-002","SH-YW1-002","SH-SJ1-002"};
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            setContentView(R.layout.device_selfinfo_lay_v19);
        } else {
        }
        ((TextView) findViewById(R.id.title_tv)).setText("设备信息");
        findViewById(R.id.ll_title_left_view).setOnClickListener(this);
        TextView id_tv = (TextView) findViewById(R.id.id_tv);
        TextView model_tv = (TextView) findViewById(R.id.model_tv);
        String idtext = getIntent().getStringExtra("id");
        boolean standard = getIntent().getBooleanExtra("standard", false);
        int mclass = getIntent().getIntExtra("class",0);
        id_tv.setText(idtext);
        if (standard) {
            model_tv.setText(classStandard[mclass]);
        }else {
            model_tv.setText(classNoStandard[mclass]);
        }
    }


    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.ll_title_left_view:
                finish();
                break;
        }
    }
}
